package com.fymxy.question_bank_management.service.serviceImpl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fymxy.question_bank_management.mapper.Course2teacherMapper;
import com.fymxy.question_bank_management.pojo.Course2teacher;
import com.fymxy.question_bank_management.pojo.Course2teacherKey;
import com.fymxy.question_bank_management.service.Course2teacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class Course2teacherServiceImpl implements Course2teacherService {

    @Autowired
    private Course2teacherMapper course2teacherMapper;

    @Override
    public int deleteByCourseKey(Integer courseNo) {
        return course2teacherMapper.deleteByCourseKey(courseNo);
    }

    @Override
    public int insert(Course2teacher record) {
        return course2teacherMapper.insert(record);
    }

    @Override
    public IPage<Course2teacher> selectAllCourse(Page page) {
        return course2teacherMapper.selectAllCourse(page);
    }
}
